skeleton_animation_set_ext


语法:

skeleton_animation_set_ext(animname, track);

参数 描述
animname The name (a string) of the animation set to use.
track The track for the animation set to use.


返回:

N/A(无返回值)


描述

When you set an animation set for your skeletal animation sprite, it is assigned track 0 internally. However, you can assign further sets to further tracks (1 and above) and in this way have your sprite play two (or more) animations at the same time. Note that the sprite should have been designed in your animation program with this in mind, such that the "base" animation in track 0 only has keyframes for certain bones, while the next tracks have keyframes for the others. For example, if you have a "walk" animation and its keyframes only affect the legs of the sprite, you can then have a set of head animations and arm animations which you can set in tracks 1 and 2 respectively, permitting you to have a base movement and adapt on it in real-time while the game is being played.

重要!该函数在试用版(Trial License)产品中可用。


例如:

if mouse_check_button(mb_left)
   {
   skeleton_animation_set_ext("bodyfight", 1);
   }
else
   {
   skeleton_animation_set_ext("bodywalk", 1);
   }

The above code will change the animation set being used by track 1 to the "bodyfight" set or the "bodywalk" set when the left mouse button is pressed.